package com.wnx.job.common.mapstruct;


import com.wnx.job.modules.nms.dto.ArticleParam;
import com.wnx.job.modules.nms.model.NmsArticle;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;


/**
 * @author wangnaixing
 */
@Mapper
public interface ArticleMapper {

    ArticleMapper INSTANCE = Mappers.getMapper(ArticleMapper.class);

    /**
     * 咨询Dto转咨询模型
     * @param articleParam
     * @return
     */
    NmsArticle toPojo(ArticleParam articleParam);

    /**
     * 咨询模型转咨询Dto
     * @param tbArticle
     * @return
     */
    ArticleParam toDto(NmsArticle tbArticle);
    
    /**
     * 咨询模型集合转咨询Dto集合
     * @param articles
     * @return
     */
    List<ArticleParam> toDtoList(List<NmsArticle> articles);


}
